package com.zyj.supplier.service.impl;

import java.util.List;

import com.zyj.common.core.text.Convert;
import com.zyj.supplier.domain.AsstesSupplier;
import com.zyj.supplier.mapper.AsstesSupplierMapper;
import com.zyj.supplier.service.IAsstesSupplierService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

/**
 * 供应商Service业务层处理
 * 
 * @author ZhuYujie
 * @date 2022-05-13
 */
@Service
public class AsstesSupplierServiceImpl implements IAsstesSupplierService
{
    @Autowired
    private AsstesSupplierMapper asstesSupplierMapper;

    /**
     * 查询供应商
     * 
     * @param supplierId 供应商主键
     * @return 供应商
     */
    @Override
    public AsstesSupplier selectAsstesSupplierBySupplierId(Long supplierId)
    {
        return asstesSupplierMapper.selectAsstesSupplierBySupplierId(supplierId);
    }

    /**
     * 查询供应商列表
     * 
     * @param asstesSupplier 供应商
     * @return 供应商
     */
    @Override
    public List<AsstesSupplier> selectAsstesSupplierList(AsstesSupplier asstesSupplier)
    {
        return asstesSupplierMapper.selectAsstesSupplierList(asstesSupplier);
    }

    /**
     * 新增供应商
     * 
     * @param asstesSupplier 供应商
     * @return 结果
     */
    @Override
    public int insertAsstesSupplier(AsstesSupplier asstesSupplier)
    {
        return asstesSupplierMapper.insertAsstesSupplier(asstesSupplier);
    }

    /**
     * 修改供应商
     * 
     * @param asstesSupplier 供应商
     * @return 结果
     */
    @Override
    public int updateAsstesSupplier(AsstesSupplier asstesSupplier)
    {
        return asstesSupplierMapper.updateAsstesSupplier(asstesSupplier);
    }

    /**
     * 批量删除供应商
     * 
     * @param supplierIds 需要删除的供应商主键
     * @return 结果
     */
    @Override
    public int deleteAsstesSupplierBySupplierIds(String supplierIds)
    {
        return asstesSupplierMapper.deleteAsstesSupplierBySupplierIds(Convert.toStrArray(supplierIds));
    }

    /**
     * 删除供应商信息
     * 
     * @param supplierId 供应商主键
     * @return 结果
     */
    @Override
    public int deleteAsstesSupplierBySupplierId(Long supplierId)
    {
        return asstesSupplierMapper.deleteAsstesSupplierBySupplierId(supplierId);
    }
}
